package cn.biplam.common.bean.md;

import cn.biplam.common.bean.Bean;
import cn.biplam.common.client.OperatorResult;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.UserInfo;

public abstract class MdTheme extends Bean {

	/**
	 * 主题名称
	 * @return
	 * @throws ErrorMessage
	 */
	public abstract String getName() throws ErrorMessage;

	/**
	 * 主题id
	 * @return
	 * @throws ErrorMessage
	 */
	public abstract String getID() throws ErrorMessage;

	/**
	 * 主题描述
	 * @return
	 * @throws ErrorMessage
	 */
	public abstract String getDesc() throws ErrorMessage;

	/**
	 * 主题的父亲id
	 * @return
	 * @throws ErrorMessage
	 */
	public abstract String getParentId() throws ErrorMessage;

	/**
	 * 排序号
	 * @return
	 * @throws ErrorMessage
	 */
	public abstract String getOrId() throws ErrorMessage;

	/**
	 * 取主题结果集
	 * @return
	 */
	public abstract OperatorResult getSelectResult();
	
	/**
	 * 新建实例
	 * @param classParams 类参数
	 * @return 实例
	 * @throws ErrorMessage
	 */
	public static MdTheme getNewInstance(Object... classParams) throws ErrorMessage{
		return (MdTheme)get(MdTheme.class.getSimpleName(), classParams);
	}
	
	/**
	 * 新建实例
	 * @param mUser     用户信息
	 * @param mid       主题ID
	 * @param modelType 模型类型
	 * @return 实例
	 * @throws ErrorMessage
	 */
	public static MdTheme getNewInstance(UserInfo mUser,String mid,String modelType) throws ErrorMessage{
		return (MdTheme)get(MdTheme.class.getSimpleName(), mUser, mid, modelType);
	}
	
	public abstract String getTHEME_ID();

	public abstract String getPARENT_THEME_ID();

	public abstract String getTHEME_NAME();

	public abstract String getTHEME_DESC();

	public abstract String getORID();

}